template
  div
    h1分类表h1
    table border=6 cellspacing=0 align=center
      tr
        tdIDtd
        td类别td
      tr
      tr v-for=i in data
        td{{ i.id }}td
        tda href='#bookid=' + i.id{{ i.name }}atd
      tr
    table

    h1搜索h1
    p请输入姓名：input type=text v-model=megp
    button @click=fun搜索button
    {{ data1 }}

  div
template

script
export default {
  name type,
  data() {
    return {
      data {},
      data1 {},
      meg ''
    }
  },

  methods {
    btn() {
      this.axios.get('type').then(res = {
        console.log(res)
        this.data = res.data
      })
    },
    fun() {
      this.axios.get('showmeg=' + this.meg).then(res = {
        this.data1 = res.data
      })
    }
  },

  mounted() {
    this.btn()
  }
}
script

style scoped

style